<?php
define('NICED_IN', true);
define("NICED_START_MS", microtime(true));
define("NICED", "NICED");


if (!defined('DS'))
{
	define('DS', DIRECTORY_SEPARATOR);
}

if (!defined("DIR_ROOT"))
{
    define("DIR_ROOT", dirname(dirname(dirname(__FILE__))));
}

/**
 * define dir under system dir, can not override in application
 */
if (!defined('DIR_SYSTEM'))
{
	define('DIR_SYSTEM', DIR_ROOT.DS."system".DS);
}
define('DIR_CORE', DIR_SYSTEM.'core'.DS);//can not override
define('DIR_LIBRARY', DIR_SYSTEM.'library'.DS);//can not override

/**
 * define default dir path under application, can override in application
 *
 */
    //define application root dir
if (!defined('DIR_APPLICATION'))
{
    define('DIR_APPLICATION', DIR_ROOT.DS."application".DS);
}
if (!defined('DIR_APPS'))
{
	define('DIR_APPS', DIR_APPLICATION.'apps'.DS);
}
if (!defined('DIR_CLASSES'))
{
    define('DIR_CLASSES', DIR_APPLICATION.'classes'.DS);
}
if (!defined('DIR_PUBLIC'))
{
    define('DIR_PUBLIC', DIR_APPLICATION.'public_html'.DS);
}
if (!defined('DIR_INCLUDE'))
{
    define('DIR_INCLUDE', DIR_APPLICATION."include".DS);
}
if (!defined('DIR_CONFIG'))
{
	define('DIR_CONFIG', DIR_APPLICATION.'config'.DS);
}
if (!defined('DIR_DAO'))
{
	define('DIR_DAO', DIR_APPLICATION.'dao'.DS);
}

//dir in classes
if (!defined('DIR_HELPER'))
{
    define('DIR_HELPER', DIR_CLASSES."helper".DS);//helper, thirdparty util
}
if (!defined('DIR_UTIL'))
{
    define('DIR_UTIL', DIR_CLASSES."util".DS);//tool
}
